<template>
	<view class="marketing-container">
		<view class="csss flex">
			<!-- tab切换海报 -->
			<view class="con-left">
				<!-- 测试分享 -->
				<view class="left-item" :class="active === 1 ? 'active' : ''" @click="clickOther(1)">
					<view class="left-item-t">
						<i-icon icon="icondianpu" size="54rpx" :color="active === 1 ? '#fbb000' : '#666666'"></i-icon>
					</view>
					<view class="left-item-b">店铺海报</view>
				</view>
				<view class="left-item" :class="active === 2 ? 'active' : ''" @click="clickOther(2)">
					<view class="left-item-t">
						<i-icon icon="iconshangpin" size="46rpx" :color="active === 2 ? '#fbb000' : '#666666'"></i-icon>
					</view>
					<view class="left-item-b">单品海报</view>
				</view>
				<view class="left-item" :class="active === 3 ? 'active' : ''" @click="clickOther(3)">
					<view class="left-item-t">
						<i-icon icon="iconshangpin" size="46rpx" :color="active === 3 ? '#fbb000' : '#666666'"></i-icon>
					</view>
					<view class="left-item-b">多商品海报</view>
				</view>
        <view class="left-item" :class="active === 4 ? 'active' : ''" @click="clickOther(4)">
        	<view class="left-item-t">
        		<i-icon icon="iconwode" size="46rpx" :color="active === 4 ? '#fbb000' : '#666666'"></i-icon>
        	</view>
        	<view class="left-item-b">我的海报</view>
        </view>
			</view>
			
			<!-- 海报列表 -->
			<view class="con-right flex flex-ai-c">
				<!-- 加载 -->
				<u-loading :show="storePosters.length === 0" :size='44'></u-loading>

				<!-- 列表内容 -->
				<view class="flex flex-wrap-w" v-show="active === 1">
					<view class="right-item" v-for="(item, i) in storePosters" :key="i" @click="goSelectGoods(item, '店铺海报')">
						<image :src="item.bgurl"></image>
					</view>
				</view>
				<view class="flex flex-wrap-w" v-show="active === 2">
					<view class="right-item" v-for="(item, i) in onegood" :key="i" @click="goSelectGoods(item, '单品海报')">
						<image :src="item.bgurl"></image>
					</view>
				</view>
				<view class="flex flex-wrap-w" v-show="active === 3">
					<view class="right-item" v-for="(item, i) in manygood" :key="i" @click="goSelectGoods(item, '多商品海报')">
						<image :src="item.bgurl"></image>
					</view>
				</view>
        <view class="flex flex-wrap-w" v-show="active === 4">
        	<view class="right-item" v-for="(item, i) in owner" :key="i" @click="goSelectGoods(item, '我的海报')">
        		<image :src="item.bgurl"></image>
        	</view>
        </view>
			</view>
		</view>
	</view>
</template>

<script src="./marketing.js"></script>

<style lang="scss" scoped>
@import 'marketing.scss';
</style>
